sum=''
for i in range(100,1000):
    ye=str(i)
    a=int(ye[0]);b=int(ye[1]);c=int(ye[2])
    if a**3+b**3+c**3==i:
        sum=sum+ye+' '
print(sum)